//
//  FWShare.m
//  FWShare
//
//  Created by 范文青 on 14-6-14.
//  Copyright (c) 2014年 fwq. All rights reserved.
//

#import "FWShare.h"
#import "CWLSynthesizeSingleton.h"
#import "FWAccountProcotol.h"
#import "FWShareObject.h"
static NSString  *const FWInvalidArgumentsException = @"FWInvalidArgumentsException";
@interface FWShare()
{
    
}
@property (nonatomic,strong)id<FWAccountProcotol> accounts;
@end

@implementation FWShare
+ (void)setAccountClass:(Class)cls
{
    id obj = [cls new];
    if (![obj conformsToProtocol:@protocol(FWAccountProcotol)]) {
        [[[NSException alloc] initWithName:FWInvalidArgumentsException reason:@"cls must conform protocol FWAccountProcotol" userInfo:nil] raise];
    }
    [[FWShare shareCenter] setAccounts:obj];
}
CWL_SYNTHESIZE_SINGLETON_FOR_CLASS_WITH_ACCESSOR(FWShare,shareCenter);

@end
